home *** CD-ROM | disk | FTP | other *** search
- Path: nntp.crl.com!usenet
- From: bk077@freenet.hsc.colorado.edu (ted)
- Newsgroups: comp.lang.c++
- Subject: solve equation non-recursively
- Date: Fri, 29 Mar 1996 02:43:01 GMT
- Organization: CRL Dialup Internet Access
- Message-ID: <4jfjfv$q7b@nntp.crl.com>
- Reply-To: ta@crl.com
- NNTP-Posting-Host: crl5.crl.com
- X-Newsreader: Forte Free Agent v0.46
-
- i am trying to write a program to solve a 1st order equation but it
- cannot be done recursively because it can use up to 10,000 variables,
- which would wipe out my memory.
-
- the equation would look like; A*x1 + B*x2 + C*x3 ... Z*xn = Z
- where n <10,000
-
- i am given x1, x2, x3... xn, and Z
- also, everything is of type int.
-
- example;
- x1, x2, x3 = {23, 44, 55}
- Z = 1000
-
- would look like: 23A+44B+55C = 1000,
- i need to solve for A, B, and C.
-
- i need only the 1st (arrived at ) solution.
-
- any suggestions?
-
- tnx, ted atwood.
-
- ta@crl.com
-
-
-